<?php
//This file must be kept writeable to the apache user!
defined( '_JEXEC' ) or die( 'Restricted access' );

global $palvelutiski_globalTable, $palvelutiski_siteGlobal, $palvelutiski_locked, $palvelutiski_globalCats, $palvelutsiki_globalMessageUrl, $palvelutiski_siteId, $palvelutiski_googleApiKey;

//$palvelutiski_siteId = 1;							//Id of the site
//$palvelutiski_googleApiKey = "none";
//$palvelutiski_siteId = 1;							//Id of the site
//$palvelutiski_googleApiKey = "ABQIAAAAqHdXOqn72ACNI-NCmclTYxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRbm_KOuIbbh2cLGlyHi7EN8zbGeQ";

$palvelutiski_globalTable = 'joomlashared.jos_';		//Prefix of the global database
$palvelutiski_siteGlobal = 0;						//Whether the site lists all services or only own services
$palvelutiski_locked = 0;							//Lock all services?
$palvelutiski_globalCats = 1;						//Use local or global category listings?
$palvelutsiki_globalMessageUrl = 'http://kaupunginosat.net/palveluhakemisto';



//Fetch some configuration stuff from the (global) database
require_once(JPATH_SITE.DS.'components'.DS.'com_palvelutiski'.DS.'database.php');

global $mosConfig_live_site; 
$mosConfig_live_site = JURI::getInstance()->base();

$query = 'SELECT dpjoomla_id, dpjoomla_google_map_key FROM '.$palvelutiski_globalTable.'dpjoomla WHERE dpjoomla_url = '.$ptdb->Quote($mosConfig_live_site);
$conf_obj = null;
$ptdb->setQuery($query);

$conf_obj = $ptdb->loadObject();

if ($conf_obj) {
	$palvelutiski_siteId = $conf_obj->dpjoomla_id;
	$palvelutiski_googleApiKey = $conf_obj->dpjoomla_google_map_key;
} else {
	//Else what???
}


?>
